package com.example.commontest.test;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * @Author huaiyu yin
 * @Date 2021/5/29 2:47 下午
 * @Version 1.0
 */
public class test {
    private static final Logger logger = LoggerFactory.getLogger(test.class);
    public static void main(String[] args) {


        try {

           throw new RuntimeException("丢出的一个错误");

        }catch (Exception e){
            logger.error("我的要传达的信息"+e.getMessage());
//            System.out.println(e.getMessage());
            System.out.println("****************");
            logger.error(e.toString());
            System.out.println("****************");

            logger.error(""+e.getStackTrace());
            System.out.println("****************");
            logger.error("我定义的异常信息",e);
        }




    }








}
